#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int second = 0;
	int hours = 0;
	int minutes = 0;
	int seconds = 0;
	scanf("%d", &second);
	hours = second / 60 / 60;
	minutes = second / 60 % 60;
	seconds = second % 60;
	printf("%d %d %d\n", hours, minutes, seconds);
	
	return 0;
}